﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface ITokenShopSubjectService {

        /// <summary>
        /// 获得商城专题列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<token_shop_subject_dto> GetTokenShopSubjects(TokenShopSubjectQuery query);

        /// <summary>
        /// 获得专题
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        token_shop_subject_dto GetTokenShopSubject(long id);

        /// <summary>
        /// 新增或修改专题
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool AddOrUpdate(token_shop_subject_dto dto);

        /// <summary>
        /// 修改专题状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        bool UpdateTokenShopSubjectStatus(long id, int status);

        /// <summary>
        /// 获得商城专题商品列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<token_shop_subject_product_dto> GetSubjectProducts(TokenShopSubjectProductQuery query);

        /// <summary>
        /// 该专题是否存在该商品
        /// </summary>
        /// <returns></returns>
        bool SubjectProductExist(long subject_id, long product_id);

        /// <summary>
        /// 专题添加商品
        /// </summary>
        /// <param name="product_dtos"></param>
        /// <returns></returns>
        bool AddProducts(List<token_shop_subject_product_dto> product_dtos);

        /// <summary>
        /// 删除对应专题商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteProduct(long id);

        /// <summary>
        /// 修改排序
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool AlterSort(token_shop_subject_product_dto id);

        /// <summary>
        /// 统计专题商品数
        /// </summary>
        /// <returns></returns>
        bool CountProducts(long subject_id);


        #region H5专题
        /// <summary>
        /// 获取专题列表
        /// </summary>
        /// <returns></returns>
        List<token_shop_subject_dto> GetTokenShopSubjects(ETokenShopSubjectType type);
        #endregion

    }
}
